# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ssh-mitm
pkgver=140.70998ba
pkgrel=7
pkgdesc='SSH man-in-the-middle tool.'
groups=('blackarch' 'blackarch-exploitation' 'blackarch-networking')
arch=('any')
url='https://github.com/jtesta/ssh-mitm'
license=('custom:unknown')
depends=('python' 'python-argparse' 'wget' 'openssl')
makedepends=('git')
source=("git+https://github.com/jtesta/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md

  rm README.md

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

